package com.xiao.controller;

import com.xiao.domain.ResponseResult;
import com.xiao.service.ArticleCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "文章分类控制层" )
@RestController
@RequestMapping("/category")
public class ArticleCategoryController {

    @Autowired
    ArticleCategoryService articleCategoryService;

    @GetMapping("/getCategoryList")
    @ApiOperation( "返回所有文章分类")
    public ResponseResult getCategoryList(){
        ResponseResult responseResult = articleCategoryService.getCategoryList();
        return  responseResult;
    }

}
